<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="zh-cn">
    <meta charset="UTF-8"/>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="description" content="厚和尚品"/>
    <meta name="keywords" content="厚和尚品"/>
    <title>厚和尚品</title>
    <link rel="apple-touch-icon-precomposed" href=""/>
    <link rel="apple-touch-startup-image" href=""/>
    <link rel="stylesheet" href="mall/css/css.css" th:href="@{/mall/css/css.css}" />
    <link rel="stylesheet" href="mall/clib/swiper/swiper.min.css" th:href="@{/mall/lib/swiper/swiper.min.css}" />
    <script type="text/javascript" src="mall/lib/zpeto/zepto-1.2.0.min.js" th:src="@{/mall/lib/zpeto/zepto-1.2.0.min.js}"></script>
    <script type="text/javascript" src="mall/lib/swiper/swiper.jquery.min.js" th:src="@{/mall/lib/swiper/swiper.jquery.min.js}"></script>
    <script type="text/javascript" src="mall/js/comm.js" th:src="@{/mall/js/comm.js}"></script>
    <script> 	
    	$(function(){
    			$("#formSearch").on("submit" ,function(){
    			   var searchText=$("#snm").val();
    			   $('#sn').val(searchText);
    			   $("#searchform").submit();
    				return false;
    			})
    	
    	})
    	
    	
    	/* function search(){
				var searchName = $('#snm').val();
				$('#sn').val(searchName);
				$('#searchform').submit();
			} */
    </script>
    
</head>
<body>

<!--swiper-->
<div class="banner">
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide" th:each="picInfo : ${picList}">
            	<a href="#"><img th:src="@{'/upload-dir/' + ${picInfo.imgPath}}" alt=""/></a>
            </div>
        </div>
        <div class="swiper-pagination"></div>
    </div>
</div>
<!--/swiper-->
<!--.search-->
<div class="search">
    <div class="search-input">
            <img class="search-input-img" src="mall/img/ico-search-01.png" th:src="@{/mall/img/ico-search-01.png}" ontouchend="search();"/>
        <div class="search-input-text">
        <form id="formSearch"  method="post"  >
            <input type="search"  name="searchName"  id="snm" placeholder="搜索您所需要的物品"/>
         </form>
        </div>
         <form id="searchform" method="post" th:action="@{/product/searchCommodity}">
        	<input type="hidden" name="searchName" id="sn" />
        </form>
    </div>
</div>
<!--/.search-->
<!--.logoIcon-->
<div class="logoIcon col-line">
    <div class="item">
        <a th:href="@{/main/list/all}">全部</a>
    </div>
    <div class="item">
        <a th:href="@{/main/list/new}">新品</a>
    </div>
    <div class="item">
        <a th:href="@{/main/list/hot}">热销</a>
    </div>
    <div class="item">
        <a th:href="@{/main/list/rmd}">推荐</a>
    </div>
</div>
<!--/.logoIcon-->
<!--recommend goods s-->
<div class="recommend">
    <div class="class-title one">
        <p>推荐商品</p>
        <span>Recommending Commodities</span>
    </div>
    <div class="floor-widget clearfix">
        <div class="floor-item" th:each="proInfo : ${recmdProList}">
            <div class="inner" th:onclick="'javascript:todetail(\''+${proInfo.productId}+'\');'">
                <img class="goods-img" th:src="@{'/upload-dir/'+${proInfo.productId}+'/min/' + ${proInfo.smallImgPath}}" alt=""/>
                <div class="title" th:text="${proInfo.productName}">商品名称</div>
                <div class="buy-line">
                    <span class="ftx-01" th:text="${proInfo.bonus}">200</span>积分+￥<span class="ftx-01" th:text="${proInfo.price}">59</span>
                </div>
                <div class="price" th:text="'市场价：￥'+${proInfo.marketPrice}">市场价：￥199</div>
                <img src="mall/img/ico-basket-01.png" th:src="@{/mall/img/ico-basket-01.png}" alt="" class="ico-basket"/>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
	function todetail(productId){
		location.href='/main/getproduct/'+productId;
	}
</script>
<!--recommend goods e-->
<!--.keeping-health s-->
<div class="keeping-health">
    <div class="class-title one">
        <p>全部商品</p>
        <span>All Products</span>
    </div>
    <div class="floor-widget clearfix">
         <div class="floor-item" th:each="proInfo : ${allProList}">
            <div class="inner" th:onclick="'javascript:todetail(\''+${proInfo.productId}+'\');'">
                <img class="goods-img" th:src="@{'/upload-dir/'+${proInfo.productId}+'/min/' + ${proInfo.smallImgPath}}" alt=""/>
                <div class="title" th:text="${proInfo.productName}">商品名称</div>
                <div class="buy-line">
                    <span class="ftx-01" th:text="${proInfo.bonus}">200</span>积分+￥<span class="ftx-01" th:text="${proInfo.price}">59</span>
                </div>
                <div class="price" th:text="'市场价：￥'+${proInfo.marketPrice}">市场价：￥199</div>
                <img src="mall/img/ico-basket-01.png" th:src="@{/mall/img/ico-basket-01.png}" alt="" class="ico-basket"/>
            </div>
        </div>
    </div>
</div>
<!--keeping-health e-->
<!--.keeping-health s-->
<div class="bottom-lx">
    <div >
        <span>沪ICP备17030112号-1</span>
    </div>
</div>
<!--keeping-health e-->
<div class="bottom-fxied" style="left: 0px; bottom: 0px; width: 100%; display: block;">
    <div class="footer-menu">
        <a th:href="@{/main/}" class="home"><img src="mall/img/ico-home-01.png" th:src="@{/mall/img/ico-home-01.png}" alt=""/></a>
        <a th:href="@{/main/list/all}" class="link-single">全部尚品</a>
        <a th:href="@{/member/main}" class="link-single">我的订单</a>
    </div>
</div>
<script>
    $(function(){
        //swiper
        var mySwiper = new Swiper('.banner .swiper-container', {
            direction: 'horizontal',
            loop: true,
            // 如果需要分页器
            pagination: '.swiper-pagination',
            autoplay: 2000,
        });
    });
</script>
</body>
</html>